package c.h.a.w.k;

import android.util.Pair;
import c.h.a.m0.j;
import c.h.a.w.e;
import c.h.a.w.e.a;
import c.h.a.w.f;
import com.liuzh.deviceinfo.DeviceInfoApp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/* compiled from: AnalyzeOverview */
public class c implements a {
    public static final String[] d;
    public long[] a = new long[6];
    public List<Pair<Float, String>> b = new ArrayList();
    public Map<String, Integer> c = new HashMap();

    static {
        String[] strArr = new String[6];
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(DeviceInfoApp.d(2131690240));
        String str = " ";
        stringBuilder.append(str);
        strArr[0] = stringBuilder.toString();
        stringBuilder = new StringBuilder();
        stringBuilder.append(DeviceInfoApp.d(2131690241));
        stringBuilder.append(str);
        strArr[1] = stringBuilder.toString();
        stringBuilder = new StringBuilder();
        stringBuilder.append(DeviceInfoApp.d(2131690238));
        stringBuilder.append(str);
        strArr[2] = stringBuilder.toString();
        stringBuilder = new StringBuilder();
        stringBuilder.append(DeviceInfoApp.d(2131690239));
        stringBuilder.append(str);
        strArr[3] = stringBuilder.toString();
        stringBuilder = new StringBuilder();
        stringBuilder.append(DeviceInfoApp.d(2131690237));
        stringBuilder.append(str);
        strArr[4] = stringBuilder.toString();
        stringBuilder = new StringBuilder();
        stringBuilder.append(DeviceInfoApp.d(2131690160));
        stringBuilder.append(str);
        strArr[5] = stringBuilder.toString();
        d = strArr;
    }

    public c() {
        Arrays.fill(this.a, 0);
        a(f.e, 0);
        a(f.f, 1);
        a(f.g, 2);
        a(f.h, 3);
        a(f.i, 4);
    }

    public final void a(String str, int i) {
        for (String str2 : str.split("\n")) {
            if (str2.contains("*")) {
                int indexOf = str2.indexOf("/");
                if (indexOf > -1) {
                    this.c.put(str2.substring(0, indexOf), Integer.valueOf(i));
                }
            } else {
                this.c.put(str2, Integer.valueOf(i));
            }
        }
    }

    public final void b(double d, String str) {
        Integer num = (Integer) this.c.get(str);
        if (num == null || num.intValue() < 0) {
            int indexOf = str.indexOf("/");
            if (indexOf > -1) {
                num = (Integer) this.c.get(str.substring(0, indexOf));
            }
        }
        if (num == null || num.intValue() < 0) {
            num = Integer.valueOf(5);
        }
        long[] jArr = this.a;
        int intValue = num.intValue();
        jArr[intValue] = (long) (((double) jArr[intValue]) + d);
    }

    public void c() {
        for (long j : this.a) {
        }
        this.b.clear();
        for (int i = 0; i < this.a.length; i++) {
            List list = this.b;
            Float valueOf = Float.valueOf((float) this.a[i]);
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append(d[i]);
            stringBuilder.append(" ");
            stringBuilder.append(j.f(this.a[i]));
            list.add(new Pair(valueOf, stringBuilder.toString()));
        }
    }

    public void f(long j, boolean z, e eVar) {
        b((double) j, j.d(eVar.e));
        if (z) {
            eVar.i.remove(this);
        }
        c();
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        for (long f : this.a) {
            stringBuilder.append(j.f(f));
            stringBuilder.append(",");
        }
        StringBuilder g = c.b.a.a.a.g("AnalyzeOverview{sizeData=");
        g.append(stringBuilder.toString());
        g.append('}');
        return g.toString();
    }
}
